import React from "react";
import type { RouteObjects } from '../interface'
import lazyLoad from '../utils/lazyLoad'

const errorRouter: Array<RouteObjects> = [
  {
    path: '/403',
    element: lazyLoad(React.lazy(() => import("../../components/ErrorMessage/403"))),
    meta: {
      requiresAuth: true,
      title: '403页面',
      key: '403'
    }
  },
  {
    path: '/404',
    element: lazyLoad(React.lazy(() => import("../../components/ErrorMessage/404"))),
    meta: {
      requiresAuth: false,
      title: '404页面',
      key: '404'
    }
  },
  {
    path: '/500',
    element: lazyLoad(React.lazy(() => import("../../components/ErrorMessage/500"))),
    meta: {
      requiresAuth: false,
      title: '500页面',
      key: '500'
    }
  }
];

export default errorRouter